//
//  CollectionHeardView.swift
//  swiftDatatable
//
//  Created by 李朋 on 2017/5/25.
//  Copyright © 2017年 李朋. All rights reserved.
//

import UIKit

class CollectionHeardView: UICollectionReusableView {
    
    var didTapEvent: (() -> Void)? = nil
    
    @IBOutlet weak var titleLabel: UILabel!
    
    @IBOutlet weak var signImage: UIImageView!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        setupUI()
    }
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        setupUI()
    }

    
    @objc func sortData() {
        print("排序")
        self.didTapEvent?()
    }
}

extension CollectionHeardView {
    
    func setupUI() {
        let tap = UITapGestureRecognizer(target: self, action: #selector(sortData))
        addGestureRecognizer(tap)
    }
}










